import { createRouter, createWebHistory } from 'vue-router';

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path:'/',
      name:'Home',
      component:()=>import('../views/HomeView.vue'),
      children:[
        {
          path:'',
          name:'Homes',
          component:()=>import('../components/BodyList.vue')
        },
        {
          path:'search',
          name:'Search',
          component:()=>import('../views/SearchView.vue')
        },
      ],
    },
    {
      path:'/:pathMatch(.*)*',
      name:'NotFound',
      component:()=>import('../views/NotFoundView.vue')
    },
  ],
});

export default router;
